#pragma once

class DBReader
{
private:
	void Connect (System::Data::SqlClient::SqlCommand ^);
	void Read (System::Data::SqlClient::SqlCommand ^, int *);
	void Read (System::Data::SqlClient::SqlCommand ^, double *, int, int);
	void ConvertByteArrayToDoubleArray(array<System::Byte> ^, double *, int);
public:
	DBReader ();

	void LoadFlightNums (int, int *, int *, int);
	void LoadFlightNums (int, int, int, int *, int *, int);
	void LoadFlight (int, double *, int, int, int);
	void LoadFlight (int, double *, int, int, int, int, int);
	void LoadFlightSubsystem(int, int, double *, int, int, int, int, int);
		
	void LoadVectorsNums (int, int *, int, int *, int *);
	void LoadVectorsNums (int, double, int *, int *);
	void LoadSubsystemsVectorsNums(int, int, double, int *, int *);
	void LoadClusterVectorsNums (int, double, int *, int *, char *, int);
	void LoadFlightSubsystemsVectorsNums(int, int, double, int *, int *);
	void LoadVectors (int, double *, int *, int, int, int);
	void LoadVectors (int, double *, double, int, int);
	void LoadSubsystemsVectors(int, int, double*, double, int, int);
	void LoadFlightSubsystemsVectors(int, int, double*, double, int, int);
	void LoadClusterVectors (int, double *, double, int, int, char *, int);
	void GetFlightIDsNum (int, int *);
	void GetFlightIDs (int, double *, int);

	void GetClusteredFlightIDsNum (char *, int *);
	void GetClusteredFlightIDs (char *, double *, int);

	void LoadClusteringNums (int, int *, int *, char *);
	void LoadClustering (int, double *, double *, int, int, char *);
	void LoadClusteringNums (int, int *, int *, int *, char *);
	void LoadClustering (int, double *, double *, double *, int, int, int, char *);

	void LoadMetricRealizationNum (char *, char *, int *);
	void LoadMetricRealizationNum (int, int *);
	void LoadMetricRealizationNum (int, int *, int *);
	void LoadMetricRealization (char *, char*, double *, char *[], int);
	void LoadMetricRealization (int, char *, double *, char *, int);
	void LoadMetricRealization (int, char *, double *, char *, int, double *, int);
	void GetEvaluatedFlightIDsNum (int, int *);
	void GetEvaluatedFlightIDs (int, double *, int);
	void LoadMetricTypesNum (int, int, int *);
	void LoadMetricTypes (int, int, double *, char *[], int);
	void LoadMetricNum (int, int, int, int *);
	void LoadMetric (int, int, int, double *, int);

	void LoadProblems (int, double *, int);

	void LoadFlightVectorsNums (int, double, int *, int *);
	void LoadFlightVectors (int, double *, double, int, int);

	int GetClustersNum (char *);

	void GetClusteringRunDate (int, char *);

	void GetParameterIDsNum (int, int *);
	void GetParameterIDs (int, double *, int);

	void LoadParameterNum (int, int, int *);
	void LoadParameter (int, double *, int, int);
};

